<template>
	<view>
		<view class="Address_1">
			<text class="Address_2">姓名</text>
			<uni-easyinput v-model="StuName" style="width: 80%;" :styles="styles" :placeholderStyle="placeholderStyle"
				placeholder="请填写报名人姓名"  :trim="true" :maxlength="5"></uni-easyinput>
		</view>
		<view class="Address_1">
			<text class="Address_2">学号</text>
			<uni-easyinput v-model="StuId" :type="number" style="width: 80%;" :styles="styles" :placeholderStyle="placeholderStyle"
				placeholder="请填写报名人学号"  :trim="true" :maxlength="11"></uni-easyinput>
		
		</view>
		<view class="Address_1">
			<text class="Address_2">专业</text>
			<uni-easyinput v-model="Stumajor" :type="number" style="width: 80%;" :styles="styles" :placeholderStyle="placeholderStyle"
				placeholder="请填写年级+专业"  :trim="true" :maxlength="11"></uni-easyinput>
		</view>
		<view class="Address_1">
			<text class="Address_2">宿舍</text>
			<uni-easyinput v-model="Studormitory" :type="number" style="width: 80%;" :styles="styles" :placeholderStyle="placeholderStyle"
				placeholder="请填写您所住的宿舍"  :trim="true" :maxlength="11"></uni-easyinput>
		</view>
		<!-- 开始 工作要求-->
		<view class="Run_5" style="margin-top: 5rpx;height: 340rpx;">
			<text class="Run_5_1">工作经验(至少1点)</text>
			<text style="position: absolute;
				top: 120rpx;
		left:40rpx;">1:</text>
			<uni-easyinput v-model="Stuwork1" style="width: 100%;position: absolute;left: -60rpx; top: 110rpx;"
				:placeholderStyle="placeholderStyle" :maxlength="40" placeholder="请填相关工作经验第一点:....."
				:inputBorder="false">
			</uni-easyinput>
			<text style="position: absolute;top: 180rpx;left:40rpx;">2:</text>
			<uni-easyinput v-model="Stuwork2" style="width: 100%;position: absolute;left: -60rpx; top: 170rpx;"
				:placeholderStyle="placeholderStyle" :maxlength="40" placeholder="请填相关工作要求第二点:....."
				:inputBorder="false">
			</uni-easyinput>
			<text style="position: absolute;top: 240rpx;left:40rpx;">3:</text>
			<uni-easyinput v-model="Stuwork3" style="width: 100%;position: absolute;left: -60rpx; top: 230rpx;"
				:placeholderStyle="placeholderStyle" :maxlength="40" placeholder="请填相关工作要求第三点:....."
				:inputBorder="false">
			</uni-easyinput>
		</view>
		<!-- 结束 工作要求-->
		<button class="uniBt_but uniBt_but22" type="warn" size="default" @click="SignupTrue()">确定报名</button>
	
	</view>
</template>

<script>
	import {
		mapState
	} from 'vuex'
	export default {
		computed: {
			// 将 m_user 模块中的 userinfo 映射到当前页面中使用
			...mapState('m_user', ['userinfo']),
		},
		data() {
			return {
				//学生姓名
				StuName:'',
				//学生学号
				StuId:'',
				//学生专业
				Stumajor:'',
				//学生宿舍
				Studormitory:'',
				//工作经验
				Stuwork1:'',
				Stuwork2:'',
				Stuwork3:'',
				
				
				
				
			};
		},
		onLoad() {
			this.onloadSj()
		},
		methods:{
			onloadSj(){
				this.StuName=this.userinfo.userName
				this.StuId=this.userinfo.userid
			},
			SignupTrue(){
				const that=this
				uni.showModal({
					title: '报名提示',
					content: '确定报名吗?',
					cancelText: "取消",
					confirmText: "确定",
					success: function(res) {
						if (res.confirm) {
							console.log('用户点击确定');
							//当用户点击报名的时候提交报名信息 并且返回应聘中心
							console.log(that.StuName+" "+that.StuId+" "+that.Stumajor+" "+that.Studormitory+" "+that.Stuwork1+" "+that.Stuwork2+" "+that.Stuwork3)
							//向数据库发送轻松
							
							//成功
							uni.$showMsg("报名成功！")
							uni.reLaunch({
								url:'../../my/My_Applyfor/My_Applyfor'
							})
						} else if (res.cancel) {
							console.log('用户点击取消');
						}
					}
				});
			}
		}
	}
</script>

<style lang="scss">
.Address_1 {
		background-color: #FFFFFF;
		border-radius: 0px;
		padding: 20rpx;
		margin-top: 5rpx;
		position: relative;
	}

	.Address_2 {
		position: absolute;
		top: 38rpx;
		font-family: "微软雅黑";
		font-size: 14px;
	}

	.Address_12 {
		position: absolute;
		top: 100rpx;
		font-family: "微软雅黑";
		font-size: 14px;
	}

	/deep/ .uni-easyinput {
		left: 130rpx;
	}

	//弹出地址框样式
	.Runaddress_1 {
		height: 100rpx;
		text-align: center;
		font-size: 18px;
		padding-top: 10px;
	}

	//按钮
	.uniBt_but {
		border-width: 0px;
		position: absolute;
		left: 25rpx;
		top: 15rpx;
		width: 330rpx;
		height: 70rpx;
		background: inherit;
		background-color: rgba(81, 211, 211, 1);
		border: none;
		border-radius: 14px;
		color: #FFFFFF;
		font-size: 13px;
	}

	.uniBt_but22 {
		box-shadow: 5px 6px 10px #51d3d3;
		border-radius: 100px;
		width: 700rpx;
		height: 90rpx;
		line-height: 90rpx;
		font-size: 15px;
		margin-top: 820rpx;
		margin-left: 0rpx;
	}

	.uniBt_but33 {
		box-shadow: 5px 6px 10px #FD3E4D;
		border-radius: 100px;
		width: 700rpx;
		height: 90rpx;
		line-height: 90rpx;
		font-size: 15px;
		margin-top: 840rpx;
		margin-left: 0rpx;
		background-color: #FD3E4D
	}
	
	.Run_5 {
		position: relative;
		background-image: none;
		border: none;
		-moz-box-shadow: none;
		-webkit-box-shadow: none;
		box-shadow: none;
		background-color: #ffffff;
	
	}
	
	.Run_5_1 {
		border-width: 0px;
		position: absolute;
		left: 36rpx;
		top: 45rpx;
		width: 600rpx;
		height: 38rpx;
		display: flex;
		font-family: '微软雅黑';
		font-weight: bold;
		font-style: normal;
	}
	
	.abe {
		position: absolute;
		left: 580rpx;
		top: 200rpx;
		font-size: 12px;
	}
	
	.Reaade1 {
		position: absolute;
		top: 80rpx;
		left: 55rpx;
	}
	
	.Run_55 {
		position: relative;
		left: 34rpx;
		top: 50rpx;
		width: 688rpx;
		height: 390rpx;
		background-image: none;
		border: none;
		-moz-box-shadow: none;
		-webkit-box-shadow: none;
		box-shadow: none;
		border-radius: 15px;
		background-color: #ffffff;
		box-shadow: 5px 10px 10px #51d3d3;
	
	}
	
</style>
